package com.scs.dao;

import com.scs.pojo.course;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CourseMapper {
    //查询信息
    List<course> getAllCourse();
    int updateCourse(course course);
    int insertCourse(course course);
    int deleteCourse(String courseId);
    int batchRemoveCourse(List<String> list);
    List<course> batchSelectCourse(List<String> list);
    String getCourseIdByName(String courseName);
    @Select("select * from course where courseId = #{courseId}")
    List<course> getCourseById(String courseId);
    List<course> batchSelectCourseByName(List<String> list);

    @Select("select * from course where courseName like '%${key}%' or courseMajor like '%${key}%'")
    List<course> searchCourse(@Param(value = "key") String key);
}
